import { createApp } from 'vue'
import { createPinia } from 'pinia'
import Directive from '@/directive'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'


import App from './App.vue'
import router from '@/router/index'

import './style.css'
import '@/iconfont/font/iconfont.css'

// 创建pinia实例
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 创建vue应用
const app = createApp(App)

// 注册路由
app.use(router)
// 注册pinia
app.use(pinia)
// 注册全局指令
app.use(Directive)

app.use(ElementPlus)

// 挂载应用
app.mount('#app')
